package com.hujun.controller;

import com.hujun.service.EchoService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author admin
 * @create 2021-09-29-17:36
 */
@RestController
public class TestController {

    @Reference(version = "1.0.0")
    private EchoService echoService;

    /**
     * 测试，浏览器访问 http://127.0.0.1:9500/echo?message=What's your name?
     * @param message
     * @return
     */
    @GetMapping("/echo")
    public String echo(String message) {
        return echoService.echo(message);
    }

}
